/*
 * commandqueue.h
 *
 *  Created on: Dec 20, 2009
 *      Author: kevin
 */

#ifndef COMMANDQUEUE_H_
#define COMMANDQUEUE_H_
#include <queue>
#include <string>
#include "command/command.h"

#include <Poco/Semaphore.h>
using Poco::Semaphore;

using namespace std;
using Commands::Command;

class CommandQueue
{
	public:
		CommandQueue();
		virtual ~CommandQueue();

		void push( Command* );
		Command* pop();

		bool isEmpty();
	private:
		queue<Command *> commands;
		Semaphore _lock;
};

#endif /* COMMANDQUEUE_H_ */
